#ifndef _FRONTEND_H
#define _FRONTEND_H


#include "types.h"
#include <sys/stat.h>

long frontend_syscall(long n, uint64 a0, uint64 a1, uint64 a2, uint64 a3, uint64 a4, uint64 a5, uint64 a6);
void shutdown(int) __attribute__((noreturn));

struct frontend_stat {
  uint64 dev;
  uint64 ino;
  uint32 mode;
  uint32 nlink;
  uint32 uid;
  uint32 gid;
  uint64 rdev;
  uint64 __pad1;
  uint64 size;
  uint32 blksize;
  uint32 __pad2;
  uint64 blocks;
  uint64 atime;
  uint64 __pad3;
  uint64 mtime;
  uint64 __pad4;
  uint64 ctime;
  uint64 __pad5;
  uint32 __unused4;
  uint32 __unused5;
};

void copy_stat(struct stat* dest, struct frontend_stat* src);

#endif